<?php

class Base_Controller
{

protected $db;
protected $view;

function preload() {
    $called_class = get_called_class();
    if (strtolower(substr($called_class, 0, 11)) == 'controller_' && strlen($called_class) > 11) { /*...*/ }
    $this->db = registry::get('db');
    $this->view = registry::get('view');
}

function bool_ajax($result) {
    echo ($result) ?'true' : 'false';
}


function get_release_types() {
    return array('lp'    => 'LP / Альбом',
                 'ep'    => 'EP / Сингл',
                 'other' => 'Другое');
}


}